# revised based on libMaskV6
# Yongbo Tang, 20121108

# GDSII Makefile for C++
# (c) Xaveer Leijtens 2006
#
# This will just make the libMask library.
# 

CXXFLAGS = -Wall -g -I.

GENOBJ = \
	maskinit.o pointer.o environ.o cwg2.o comp.o letter.o \
	technology.o util.o box.o reflector.o \
	varwindow.o marker.o nonius.o ebl.o mmi.o triangle.o \
	straight.o curve.o taper.o connect.o libMaskVersion.o \
	link.o fraction.o gds.o libgds.o cif.o sublayout_cif.o \
	egs.o

#all: GDSLib CIFLib EGSLib 

all: libMask.a
  
libMask.a: $(GENOBJ)
	ar rcs $@ $(GENOBJ)
#	ar r $@ $(GENOBJ)
	
	
##T1 = mask
	
##wrapper: $(GENOBJ) libMask.a Makefile mask.i
##	swig -python -c++ $(T1).i
##	g++ -c $(T1)_wrap.cxx -I/usr/include/python2.6 -I./
##	g++ -I/usr/include/python2.6 -L/usr/lib/python2.6/config -L./ -shared $(T1)_wrap.o -lpython2.6 -lMask -o _lib$(T1).dll

.c.o: mask.h
	g++ -c $(CXXFLAGS) $<

.cc.o: *.h
	g++ -c $(CXXFLAGS) $<

clean:
	rm -f *.o *.a *.bak *\~ *.dll *.py
